// OUTDOOR SECTION SCRIPT
beginoutdoorscript;

variables;

int choice;

body;

beginstate INIT_STATE;
// This state called whenever this section is loaded into memory.
break;

beginstate START_STATE;
// This state is called every turn the party is in this outdoor section.
break;

beginstate 10;
	if(get_flag(5,1) == 1) {
	if(get_flag(7,1) == 1) { //they've been before (you could use the flag you set when they entered the cave before)
		message_dialog("It looks like the snowmen have melted. There won't be any others until next winter.","");
		block_entry(1);
		}
	else {
		message_dialog("This cave looks boring. And wet. And in pain. Wait, no.","Anyways, no way are you going in.");
		block_entry(1);
		}
	}
break;

beginstate 11;
if(get_flag(5,1) == 1) {
reset_dialog();
add_dialog_str(0,"Unfortunately, it seems you'll have to walk back home. At least the snow has melted. Of course, now there's mud.",0);
add_dialog_str(1,"Are you ready to leave?",0);
add_dialog_choice(0,"Yes, I'm done here.");
add_dialog_choice(1,"I want to stay.");
choice = run_dialog(1);
if(choice == 1)
set_state_continue(12);
if(choice == 2)
block_entry(1);
}
else {
reset_dialog();
add_dialog_str(0,"Unfortunately, it seems you'll have to walk back home. Through the snow. Damn.",0);
add_dialog_choice(0,"Yes, I'm done here.");
add_dialog_choice(1,"I want to stay.");
choice = run_dialog(1);
if (choice == 1)
set_state_continue(12);
if (choice == 2)
block_entry(1);
}
break;

beginstate 12;
	if (get_flag(5,1) == 1){
		message_dialog("You start trudging back home in the mud. After about an hour, the messenger appears. _Darius made me find you. He says I have to teleport you home._", "You start feeling dizzy again, and appear home with just enough time to run to the toilet to vomit. You vow never to teleport again.");
		end_scenario(0);
	}
	else {
		reset_dialog();
		add_dialog_str(0, "You start walking home in the snow. It's very deep, and shortly after you leave it starts snowing again. It gets harder and harder to fight your way through the snow, and eventually you collapse.",0);
			add_dialog_str(1, "After 10 minutes of feeling sorry for yourself, and getting even colder, the messenger appears. _Darius made me find you. He says I have to teleport you home._" ,1);
			add_dialog_str(2, "You start feeling dizzy again, but it doesn't matter because now you're feeling dizzy and cold while lying in front of your nice fire, rather than lying outside in a blizzard." ,2);
			run_dialog(1);
			end_scenario(0);
break;

beginstate 13;
	if(get_flag(5,1) == 1){
		message_dialog("It's too hot to go back in.", "");
		block_entry(1);
	}
	break;